﻿<Window x:Class="TwitterFace.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Twitter Face" Height="500" Width="800" Loaded="Window_Loaded" Closing="Window_Closing" WindowState="Maximized">
	<Window.Resources>
		<ZoomPercentageConverter x:Key="ZoomPercentageConverter"/>
		<Storyboard x:Key="HideLogin">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:01" Value="{x:Static Visibility.Collapsed}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</Window.Resources>
	<Window.Triggers>
		<EventTrigger RoutedEvent="ButtonBase.Click" SourceName="btnLogin">
			<BeginStoryboard Storyboard="{StaticResource HideLogin}"/>
		</EventTrigger>
	</Window.Triggers>
    <Canvas x:Name="cnvMain">
	<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="{Binding Path=ActualWidth, ElementName=cnvMain, Mode=Default}" Height="{Binding Path=ActualHeight, ElementName=cnvMain, Mode=Default}" x:Name="grid" SnapsToDevicePixels="True">
        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="300" Background="{x:Null}">
        	<Grid.ColumnDefinitions>
        		<ColumnDefinition />
        		<ColumnDefinition />
        	</Grid.ColumnDefinitions>
        	<Grid.RowDefinitions>
        		<RowDefinition />
        		<RowDefinition />
        		<RowDefinition />
        		<RowDefinition />
        	</Grid.RowDefinitions>
        	<Label Grid.ColumnSpan="2" HorizontalAlignment="Center" FontSize="30" FontWeight="Bold" Content="Login To Twitter"/>
        	<Label Grid.Row="1" HorizontalContentAlignment="Right" Content="Username"/>
        	<Label Grid.Row="2" HorizontalContentAlignment="Right" Content="Password"/>
        	<TextBox Grid.Row="1" Grid.Column="1" x:Name="txtUsername" Margin="0,5,0,5"/>
        	<PasswordBox Grid.Row="2" Grid.Column="1" x:Name="txtPassword" Margin="0,5,0,5"/>
        	<Button Grid.Column="0" Grid.Row="3" Margin="5,0,5,0" Content="Login" x:Name="btnLogin" Click="btnLogin_Click" />
        	<Button Grid.Column="1" Grid.Row="3" Margin="5,0,5,0" Content="Cancel" x:Name="btnCancel"/>
        </Grid>
		</Grid>
    </Canvas>
</Window>
